-
Notifications
You must be signed in to change notification settings - Fork 130
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
DEVPROD-12399: Introduce Repo GQL query #8717
base: main
Are you sure you want to change the base?
Conversation
return nil, InternalServerError.Send(ctx, fmt.Sprintf("looking in repo collection: %s", err.Error())) | ||
} | ||
if repoRef == nil { | ||
return nil, ResourceNotFound.Send(ctx, "repo doesn't exist") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit. we could add the repoID
here for more information
@@ -56,6 +56,7 @@ type Query { | |||
before: Time | |||
): ProjectEvents! | |||
projectSettings(projectIdentifier: String! @requireProjectAccess(permission: SETTINGS, access:VIEW)): ProjectSettings! | |||
repo(repoId: String! @requireProjectAccess(permission: TASKS, access: VIEW)): RepoRef! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
okay now that I'm thinking about it, I feel like we don't have any built-in support for the condition "If user has task permission for a project, they should also have task permission for the repo" and we would have to write code to support it.
it is kind of a weird condition but I think we need to have the permission restriction to block access to restricted projects
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you want to add a test for no_permissions
? There is a new field, "test_user_id"
, that can be used in the results file. It specifies which user the test should run with.
There are three users you can pick from: admin_user
, privileged_user
, and regular_user
. You can see their permissions in integration_atomic_test_util.go
DEVPROD-12399
Description
These code changes add a repo query to satisfy the use case where project info must be fetched for resources that are associated with a repoId but not a projectIdentifier. The query is very similar to the project query and will unblock fetching Parsley filters in Parsley.